<template>
	<view>
		<!-- 广告图 -->
		<banner :inset='con'></banner>
		<view class="sizheng">
			<!-- <text class="btwz">VR列表</text> -->
			<view class="sizh">
				<view class="sz_zt" v-for="(item,index) in conte" @click="tz(item.id,item.name)" :key="index">
					<view class="sz_t">
						<image :src="item.faceUrl" mode=""></image>
					</view>
					<text class="wenzi">{{item.name}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){	
			var con = '/static/banner/vr.png'
			return{
				conte:[],
				imgs:[],
				con:con
			}
		},
		onLoad(option) {
			this.imgs = option.con
			console.log(this.imgs)
		},
		created() {
			let that = this
			that.pyReq(that.$http.getVrTypeInfo,{},function(res){
					that.conte = res.result
			});
			// let headers={
			// 	  "Content-Type":"application/x-www-form-urlencoded"
			// }
			//  uni.request({
			// 	  url: that.$http.getVrTypeInfo,
			// 	  method: 'POST',
			// 	  header:headers,
			// 	  success: (res)=>{
			// 		  console.log(res)
			// 		  that.conte = res.data.result
			// 	  },
			// 	  fail: (err)=>{
			// 		  console.log(err)
			// 	  }
			// })  
		},
		methods:{
			tz(id,na){
				console.log(na)
				console.log(id)
				uni.navigateTo({
					url:'./vr_xqli?id='+id+'&na='+na
				})
			}
		}
	}
</script>

<style>
	.btwz{
		font-size: 30upx;
		margin-left: 43upx;
		margin-top: 20upx;
	}
	.sizh{
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		padding: 0 23upx;
		
	}
	.sz_t{
		width: 100%;
		height: 123px;
		border-radius: 10upx;
		overflow: hidden;
	}
	.sz_t>image{
		width: 100%;
		height: 123px;
	}
	.sz_zt{
		width: 48%;
		margin: 20upx 0;
	}
		.wenzi{
			display: block;
			text-align: center;
			font-size: 26upx;
			margin-top: 16upx;
			overflow: hidden;
			text-overflow:ellipsis;
			white-space: nowrap;
		}
</style>
